<div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="<?=site_url('admini')?>">首页</a><span class="crumb-step">&gt;</span><a class="crumb-name" href="javascript:history.go(-1);">分类属性</a><span class="crumb-step">&gt;</span><span>属性修改</span></div>
        </div>
        <div class="result-wrap">
            <div class="result-content">
                <form action="<?=site_url('admini/attribute/update')?>" method="post" id="myform" name="myform" enctype="multipart/form-data">
                    <table class="insert-tab" width="100%">
                        <tbody>
                        <tr>
                            <th width="120"><i class="require-red">*</i>所属属性：</th>
                            <td>
                                <select name="pid" id="pid" class="required">
                                    <option value="0">--顶级属性--</option>
                                    <?php foreach($list as $k => $v):?>
                                    <option value="<?=$v['id']?>" <?=$v['id'] == $res['pid'] ? 'selected' : ''?>><?=$v['aname']?></option>
                                    <?php endforeach;?>
                                </select>
                            </td>
                        </tr>
                            <tr>
                                <th><i class="require-red">*</i>属性名称：</th>
                                <td>
                                    <input class="common-text required" id="title" name="aname" size="50" value="<?=$res['aname']?>" type="text">
                                </td>
                            </tr>
                            <tr>
                                <th>默认参数：</th>
                                <td>
                                    <input class="common-text required" id="title" name="avalue" size="50" value="<?=$res['avalue']?>" type="text">
                                </td>
                            </tr>
                            <tr>
                                <th>描述：</th>
                                <td><textarea name="describe" class="common-textarea" id="content" cols="30" style="width: 98%;" rows="10"><?=$res['describe']?></textarea></td>
                            </tr>
                            <tr>
                                <th></th>
                                <td>
                                	<input name="id" value="<?=$res['id']?>" type="hidden" />
                                    <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                                    <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button">
                                </td>
                            </tr>
                        </tbody></table>
                </form>
            </div>
        </div>
        
        <script>
        $('#myform').submit(function() {
            $(this).ajaxSubmit(function(data){
                if(data == 1){
                    layer.alert('修改属性成功！',{
                        icon:1,
                    },function(){
                    	history.go(-1);
                    });
                }else{
                    layer.alert(data,{
                        icon:2,
                    });
                }
            })
            return false;
        })
        </script>